<template>
  <div class="container">
    姓名：{{name}}，月薪:{{salary}} ， {{obj}}<button @click="say">打个招呼</button>
  </div>
</template>
<script>
import { ref } from 'vue'
export default {
  setup () {

    console.log('setup执行了')
    console.log(this)
    // 定义数据和函数
    const name = '小吴'
    let salary = ref(18000)
    let obj = ref({address: '武汉'})
    const say = () => {
    //   salary.value = salary.value * 2

        obj.value.address = '北京'

      console.log('我是', name,  salary.value)
    }


    return { name , say, salary, obj }
  }
}
</script>